package com.xiaodu.acer.phoneplay.ui.fragment;

import android.view.animation.AccelerateDecelerateInterpolator;

import com.eftimoff.androipathview.PathView;
import com.xiaodu.acer.phoneplay.R;
import com.xiaodu.acer.phoneplay.di.component.AppComponent;
import com.xiaodu.acer.phoneplay.ui.base.BaseFragment;

/**
 * 优化后的启动页
 */
public class WelcomeFragment extends BaseFragment {

    private PathView mPathView;

    @Override
    public int setLayout() {
        return R.layout.fragment_welcome;
    }

    @Override
    public void setupAcitivtyComponent(AppComponent appComponent) {

    }

    @Override
    public void init() {
        mPathView = mRootView.findViewById( R.id.pathView );

        mPathView.getPathAnimator()
                .delay( 100 )
                .duration( 100 )
                .interpolator( new AccelerateDecelerateInterpolator() )
                .listenerEnd( new PathView.AnimatorBuilder.ListenerEnd() {
                    @Override
                    public void onAnimationEnd() {
                        //  jump();
                    }
                } )
                .start();
    }


}
